//
//  QQView.m
//  HWUI09_UITabBarController
//
//  Created by 崔将军 on 16/3/21.
//  Copyright © 2016年 崔将军. All rights reserved.
//

#import "QQView.h"

@implementation QQView

- (instancetype)initWithFrame:(CGRect)frame {
    
    self = [super initWithFrame:frame];
    if (self) {
        
        [self createTextField];
    }
    return self;
}

- (void)createTextField {
    
    // user
    self.userTF = [[UITextField alloc] initWithFrame:CGRectMake(0, 0, 200, 50)];
    self.userTF.placeholder = @"输入账号";
    self.userTF.borderStyle = UITextBorderStyleBezel;
    self.userTF.backgroundColor = [UIColor cyanColor];
    [self addSubview:self.userTF];
    [self.userTF release];
    
    // pwd
    self.pwdTF = [[UITextField alloc] initWithFrame:CGRectMake(0, 80, 200, 50)];
    self.pwdTF.placeholder = @"输入密码";
    self.pwdTF.backgroundColor = [UIColor cyanColor];
    self.pwdTF.borderStyle = UITextBorderStyleBezel;
    [self addSubview:self.pwdTF];
    [self.pwdTF release];
    
    // button
    self.button = [UIButton buttonWithType:UIButtonTypeSystem];
    self.button.frame = CGRectMake(50, 160, 100, 50);
    [self.button setTitle:@"登录" forState:UIControlStateNormal];
    self.button.backgroundColor = [UIColor greenColor];
    [self addSubview:self.button];
    [self.button release];
    
}

@end
